Cleaned up code by removing tabs and using only spaces
Added tests for multiple dispatch