Refactors sleep part a bit, fixes one bug
Refactors sleep part a bit, fixes one bug

philippbayer/snpr,philippbayer/snpr,openSNP/snpr,philippbayer/snpr,openSNP/snpr,gedankenstuecke/snpr,vivekiitkgp/snpr,vivekiitkgp/snpr,openSNP/snpr,vivekiitkgp/snpr,gedankenstuecke/snpr,gedankenstuecke/snpr,gedankenstuecke/snpr,vivekiitkgp/snpr,philippbayer/snpr,openSNP/snpr