move deps to local directory
convert function declarations to function expressions