Added initial tests and more core functionallity