mount_points function added, removed template function, fixed logic