Cleaned up a lot of the code. Removed some of the unimplemented code. Added regions to find certain code faster. removed duplicate code.