Fix deprecation and unused attribute warnings

Oooooh array indexing!!! <3 <3 <3