Fixed minor bug in edit, also added possible method to deal with maxId, and added comment about the issue with that method.