Converted to AMD module for RequireJS