Cleaned up code, added 'spec' directory