Merge pull request #107 from ctiller/extern

Add extern where its required