tweaking some styles and simplifying some code