Started 1.7.10 port
Started refactoring