Refactoring the internals of frame class, in order to reduce the memory footprint
trying to reduce memory footprint, not very successful
cleaning