Refactor to better use closures and improve performance

Moved everything into closure and no need to re-create lang & formats variables every function call. Also moved normalize out of the humaneDate function call too.