Adding code Mirror

Adding code mirror and some entiti changes.