Module errors and many small improvements