updates, comments, and cleanup to base code