Optimization

Remove warnings
Remove TODOs
Rearrange constants