Added 'use strinct' and fixed coding style with jslint.