Heavy rendering refactoring

still buggy