did a lot of refactoring, removed all test files for now and added rpc stuff