Moved class to separate file. Fixes #16