Modularise lib code, adds moment js to parse when repo was last updated.