Added a feature to the compiler that allows function declaration in any order.
First compiled version of sort, probably contains some errors