Bugs fixed and some modifications required for new features in Core