Cleanup, move external javascript to /lib