Merge "Move code to plugin core lib"