Modified app file structure by separating concerns. Added some additional karma tests.