Static Function Refactorings

 * fixes Issue #658
 * stack logic moved from function call to function
 * static functions are no longer expressions