Full refactoring, almost ready for team working =)