Fixed bugs + semantic changes