added edit menu, moved mainArea and mainFrame into programState, so it is not a required argument of most functions anymore