cleanign up code and fixing known issues.

created js edits to iterate changes needed.