Re-indented, added func traces and func console traces