Fixed bugs introduced in refactoring
deleted unused files