Add Logging, properties, comparator, sorting and refactor code.