Removed unused headers + minor code cleanning