Added toggle for asynchronous and synchronous mode
• synchronous mode specifically for unit testing
• cleanup of comments
• cleanup of platform detection