Fixing merge isues and resolving errors