Sort functions
Add some constants
Arrange functions