Cleanup and started work on frame buffer