Major name refactoring
Fixed some bugs