cleaned up code (enhanced documentation, etc.)