Improved the courtesy functions and sorted the code for better viewing and cleaner diffs

By adding some sorts, diffs will no longer contain that much changes as services and structs will now be created alphabetical.