enchanced ui layout; optimized memory usage