(flex:reg-test:refac+new test): reogranized files to make it more
maintainable and practically usable; eliminated redundancy; added new
reg test for noxml API