Use data()
Remove C-style casts
Input cleanup/optimization
Minor changes (WIP)