Cleaned up code using make file.  Unused variables removed.