Added SingleInstance check to App Main

Also cleaned up some inconsistent access.