Add support for Releases API and simplify code