Fix issues #6 #13 #14

Fix issue #6 
Fix issue #13 
Fix issue #14 
Fix indentations.