Moved mini window into seperate file. Fixed all bugs