cleaned code, updated license