Added observer pattern, added unit testing and fixed some minor bugs