Add amd, commonjs support and switch to lower case