merged js and controller files from Ami