complete code refactoring, some methods renamed, many methods added and readme updated