unified uptime calculation and some bit sof refactoring
version 0.4 with updated uptime starting intervalls