Removed unnecessary local variable.
Appending whole table and select button to the placeholder div if devices list is not empty.
Clear session value for selected device and package when there is not device.