Generating id for new tasks

Simple implementation, getting the bigger id and increasing it by one.