Cleaned up const casting