Add exception handling. Refactor Application#call