Refactor and updated specification
Updated files
Updated comments