Added various tweaks in lib/ plugins and theme