Added commit functionality
fix small issues