Restructured Class library, wrote more tests