Removed all unused imports and some unused code. Fixes #7