Add stack management

  * Function to update stack application
  * Store stack version in database