Changed some of the structure, added test file