Some Improvements and code beautified, border fix