beautify core module
remove bad practice
remove bluebird require in test