Made some changes for functionality and testing.