Code optimization
Bugfixes