Big refactor as of discovering libermate