Removed unused code
Started adding tests