Added application function and other crap that I can't remember
Merged dev