Minor fixes

Little code cleanup and one minor fix for the page edit form