added POD, comments, variable name changes