Cleaned up the code. Renamed widget