Change to using ints
Fix class issues