Fixing pretty printing and function declarations