[NEW] factory methods and added some .pyc and acceptance test for singleton