Cleaned up code

Split strlst part into cat_strlst.{c,h}
Also changed all bitfields/bitflags into bools.
Sadly, this made me add a bit of globals, but passing ~6 bools to each function
will make the code really ugly