Removed debug code and added yield blocks to allow for some displaying flexibility