Switch to mixin implementation for devicefixed and non devicefixed envirornments.
Updated most comments.
Fix JSHint errors