Nate's first checkout

Fixed some indent issues. Changed sim to a name that didn't
conflict with Matlab's built in function. Added visualization code.