Refactored database, logging and rasterizer; documentation cleanup