Removed 'print'...
A layer could be enabled or disabled when created.
A layer could be enabled or disabled when modifying...
Cleaned up the code.
Fixed some bugs following the previous commit.