Fixed build + refactored gralloc a bit