Fixed invalid int and NullPointer

Now just need to fix empty array list (index errors)