Fixed refactored classes bugs. Refactor version 1.0