Removed BOM and added missed template token
Made module definition more robust