Improve deployment functions