[!!] huge cleanup, fixes