Updates to make it cross platform and added suggestions in comments.