Cleaned up kmd.php template