REFACTOR: move common VPC functions and remove obsolote functions