clean up compile function, use proper extension and update readme