Refactored, fixed positioning