Some refactoring is made. Added comments. Changed planet table format