Add indeces and cleaned up code. Done.