Changed album list to array instead of an associative array

It solves the issue of album sorting: json_encode now creates a list
instead of an object which can't be sorted.
Revert "Changed album list to array instead of an associative array"

This reverts commit 67788790b2d8070963f11845f8e9d77581290ff3.
Code improvements