Added #15 Fixed #13 and fixed sorting in manager