Update build and fix Framework methods

Makes it work 100% inside frameworks.