Cleaned up code and nag bar