Fixing a function prototype issue and some minor syntax issues