Addressed review comments

- fixed invalid file permissions

- removed redundand mem::transmute

- removed outdated FIXME's

- removed redundand temporary variable

- removed macro_export for internal macros