Refactoring, removed bin directory, more cleanup