Updated structure, added jasmine tests