Everything seems working but its after huge refactoring