Code improvements. Added tests for Form object