Moved preprocessor to different package; cleaned up code