Cleaned up legacy stuff

There was a bunch of stuff for testing and functions that are not being
used, removed them from the codebase