Cleaned up implementation and created example index file