Fixed flickering and simplified calculations

- Removed offending line causing a flicker to the default top state
- Simplified calculation of the top offset when in the bottom state