Restructure layout of functions, follow alphabetical ordering