Fix bug in asset discovery
Clean up environment loading