Added tests, converted to NetBeans project