Added in end button stuff