Fixed the Exceptions and added API loader