cleaned up commented code and got rid of redundant tests