getItem now returns based on ID, not slot. Use getItemAt for slot. Reformatted code and optimized imports.