Code cleanup
Merge from lanscape branch