Starting to follow good practice! Added basic unit tests too.