Revert 857ed19..1b034c4

This rolls back to commit 857ed19ad4400304c4010360ab06461181a7c5ec.
Revert 5ce7aee..5e11854

This rolls back to commit 5ce7aee2b3f4a13d5a7b961da3fdbabc63986329.
Revert 1b0fa1c..a518e0b

This rolls back to commit 1b0fa1c9c218a57bf434240d1ddf8d892e1a3e55.
Moved getFunctions to global space. Need to move later.