merged code and cleaned up dir