Simplified template and moved into a single file