Fixed comments and added some more functions