Fix: added comments and removed unused code