refactored for easy testing
completed tests
added a stylesheet to fix the block when the editor is active