Added commenting in and fixed a bug with argument types