Fixed forms validation
Added unit tests (FINISH YOUR OWN)