Cleaned Code and revamped indicies