Added basic tests and main