Add monitoring of charging status for battery, refactor resources