Replace asserts with warnings, plugin info
Reorganizing code