Fixes compilation issues and changing the method signatures