refactor classes (finally ^^)