Code fixed to reduce boot speed and some changes