moved some settings over to the database, and fixed some bugs

Signed-off-by: Alexander Skjolden <alex@plastboks.net>