Edit function and bug fixes to frontpage