Fixed some details and created more tests