Refactoring a bit the raw graphics API code; Implementing 3D UI