cleaned up and renamed server task to serve
fixed wrong sorting order by passing sorting function as param so render rectangle is calculated correctly
added position attribute to layer to reposition layers
updated ui test