Plugin system is working well now, but code is still not clean enough