Remove test code, add comments