Added toString() method. Some refactoring around AptUtils class.