Rewritten the lighting system: now operates offline

Signed-off-by: Irmo van den Berge <bergerkiller@gmail.com>