Minor changes. Final result is accomplished, plugin is working fine.