Manual dot initialization and some cleanup