Added core module init for testing and fixed bugs