Commented code and made API