Cleanup and implement better dialog boxes