code reduced, choose theme feature added, proper printing statements added for tracing and for logs