Cleanup

Signed-off-by: Jack Huey kitskub@gmail.com
Optimize these a little

Signed-off-by: Jack Huey kitskub@gmail.com
Directly use an int[] for performance reasons

Signed-off-by: Jack Huey kitskub@gmail.com