final microwave fixes and code refactoring