"Introduce Junit tests + some bug fixes"