Added some //REVIEW markers, performed various code cleanup, see #29.