Edited the code templates to be a tad more sophisticated