Refactoring

cleaned up a little bit