Clean up code formatting on permalinks methods