Code cleanup & addtional comments added