Refactoring, lightmap fixes, improved undo/redo, added tags, improved entity lighting.