Fiexed a series of bugs - some serious
Added return codes

Conflicts:
	readme.txt