fixed some indentation issues
fixed more spacing issues
updated syntax
added some more tests
added useful comments