Add AMD support, enhancements/reduce redundancies, better return statements, add String.prototpe.trim to feature detect