minor Factory close bug fixed, few UnitTests, CheckStyle