Fixed partition functions
Merge branch 'master' into dbi3

Conflicts:
	.gitignore
merged master