Refactor/clean up repository #252

See #252