Changes for import and postgres usage