Cleaned out some bugs, updated comments. (Version to be released with 2.5.4)