Extract method refactoring
Store target and target offset information

The target is needed to recompute the position of the target after a
resize. The offset information is necessary to take the mouse pointer
position into account
Reposition context menu after window resizing
Remove superfluous newline
Use object notation preferred by lint
Merge pull request #1 from finnlabs/feature/respect_window_resizing

Feature/respect window resizing